﻿using System.Configuration;

namespace OneWorks.Common.AdoNet.Configuration
{
    [ConfigurationCollection(typeof(DbProviderCollection))]
    public class DbProviderCollection : ConfigurationElementCollection
    {
        protected override ConfigurationElement CreateNewElement()
        {
            return new DbProviderElement();
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((DbProviderElement)element).Key;
        }

        public new DbProviderElement this[string key]
        {
            get {
                return (DbProviderElement)BaseGet(key);
            }
        }
    }

}
